package com.j283_5.wisdom_park.controller.operating_overview;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.j283_5.wisdom_park.common.result.ResultData;
import com.j283_5.wisdom_park.vo.property_overview.ChartVo;
import com.j283_5.wisdom_park.vo.property_overview.EnterprisesVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * <p>
 * 运营总览
 * </p>
 *
 * @author 蒋翔
 * @since 2022-04-28
 */

@RestController
@RequestMapping("/operatingTheOverview")
@Api(value = "运营总览",tags = "运营总览",produces="蒋翔")
public class OperatingTheOverview {

    @RequestMapping(value = "/totalNumberOfArticles" , method = RequestMethod.GET)
    @ApiOperation(value = "文章总数（篇）",notes = "文章总数（篇)",produces="蒋翔", response = ResultData.class)
    public ResultData totalNumberOfArticles(){
        return ResultData.ok().data("124");
    }

    @RequestMapping(value = "/potentialCustomers" , method = RequestMethod.GET)
    @ApiOperation(value = "潜在客户（个））",notes = "潜在客户（个）",produces="蒋翔", response = ResultData.class)
    public ResultData potentialCustomers(){
        return ResultData.ok().data("1213");
    }

    @RequestMapping(value = "/companyProfile" , method = RequestMethod.GET)
    @ApiOperation(value = "企业情况（家）",notes = "企业情况（家）",produces="蒋翔", response = ResultData.class)
    public ResultData companyProfile(){
        return ResultData.ok().data("1213");
    }

    @RequestMapping(value = "/parkUsers" , method = RequestMethod.GET)
    @ApiOperation(value = "园区用户（人）",notes = "园区用户（人）",produces="蒋翔", response = ResultData.class)
    public ResultData parkUsers(){
        return ResultData.ok().data(1213);
    }

    @RequestMapping(value = "/todo" , method = RequestMethod.GET)
    @ApiOperation(value = "待办事项",notes = "待办事项",produces="蒋翔", response = ResultData.class)
    public ResultData todo(){
        ChartVo chartVo1 = new ChartVo("入驻待审核企业", 23);
        ChartVo chartVo2 = new ChartVo("入驻待审核企业", 42);
        ChartVo chartVo3 = new ChartVo("入驻待审核企业", 22);
        ChartVo chartVo4 = new ChartVo("入驻待审核企业", 37);
        ArrayList<ChartVo> chartVos = new ArrayList<>();
        chartVos.add(chartVo1);
        chartVos.add(chartVo2);
        chartVos.add(chartVo3);
        chartVos.add(chartVo4);
        return ResultData.ok().data(chartVos);
    }

    @RequestMapping(value = "/latestDevelopment" , method = RequestMethod.GET)
    @ApiOperation(value = "最新动态",notes = "最新动态",produces="蒋翔", response = ResultData.class)
    public ResultData latestDevelopment(){
        ArrayList<String> strings = new ArrayList<>();
        strings.add("我（超级管理员） 通过了{公司}的入驻申请");
        strings.add("我（超级管理员） 通过了{公司}的入驻申请");
        strings.add("我（超级管理员） 通过了{公司}的入驻申请");
        strings.add("我（超级管理员） 通过了{公司}的入驻申请");
        strings.add("我（超级管理员） 通过了{公司}的入驻申请");
        strings.add("我（超级管理员） 通过了{公司}的入驻申请");
        return ResultData.ok().data(strings);
    }
    @RequestMapping(value = "/qualificationsOfEnterprises" , method = RequestMethod.GET)
    @ApiOperation(value = "园区企业资质情况",notes = "园区企业资质情况",produces="蒋翔", response = ResultData.class)
    public ResultData qualificationsOfEnterprises(){
        EnterprisesVo enterprisesVo = new EnterprisesVo();
        HashMap<String, Object> map = new HashMap<>();
        map.put("上市公司",88);
        map.put("高新企业",361);
        map.put("规上企业",681);
        map.put("专精特新企业",682);
        enterprisesVo.setEntMap(map);
        ArrayList<ChartVo> chartVos = new ArrayList<>();
        ChartVo chartVo1 = new ChartVo("能源",200);
        ChartVo chartVo2 = new ChartVo("工业",200);
        ChartVo chartVo3 = new ChartVo("农业",200);
        ChartVo chartVo4 = new ChartVo("医疗",200);
        ChartVo chartVo5 = new ChartVo("制造页",200);
        ChartVo chartVo6 = new ChartVo("交通",200);
        ChartVo chartVo7 = new ChartVo("信息化服务业",200);
        chartVos.add(chartVo1);
        chartVos.add(chartVo2);
        chartVos.add(chartVo3);
        chartVos.add(chartVo4);
        chartVos.add(chartVo5);
        chartVos.add(chartVo6);
        chartVos.add(chartVo7);
        return ResultData.ok().data(chartVos);
    }

}
